<html>
	<head>
		<title>WebSocket Wrapper test</title>
		<script src="http://swfobject.googlecode.com/svn/trunk/swfobject/src/swfobject.js" type="text/javascript"></script>
		<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.js"></script>
		<script type="text/javascript" src="jsocket.js"></script>
		<script type="text/javascript" src="jsocket.advanced.js"></script>
		<script type="text/javascript" src="WebSocket-wrapper.js"></script>
	</head>

	<body>
		Example borrowed from http://www.codeproject.com/KB/webservices/c_sharp_web_socket_server.aspx
			
		<script type="text/javascript">		
		
		if('WebSocket' in window){
		 connect('ws://localhost:8181/service');
		}
 
		function connect(host) {
		  var ws = new WebSocket(host);
		  ws.onopen = function () {
			alert('connected');
			ws.send("test1234");
		  };
		 
		  ws.onmessage = function (evt) {  
			alert('reveived data:'+evt.data);
		  };
		 
		  ws.onclose = function () {
			alert('socket closed');
		  };
		};
		</script>
	</body>
</html>